package model.entities;

import java.io.Serializable;
import java.util.Date;

public class AcessoFuncionarioId implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5763750795236267048L;
	private String matricula;
	private Date datahoraAcesso;
	
	public AcessoFuncionarioId(){
		
	}
	public AcessoFuncionarioId(String matricula,Date datahoraAcesso){
		this.matricula = matricula;
		this.datahoraAcesso = datahoraAcesso;
	}
	public boolean equals(Object other) {
	         if ( (this == other ) ) return true;
			 if ( (other == null ) ) return false;
			 if ( !(other instanceof AcessoFuncionarioId) ) return false;
			 AcessoFuncionarioId castOther = ( AcessoFuncionarioId ) other;
			 return (this.getMatricula()==castOther.getMatricula()) || ( this.getMatricula()!=null && castOther.getMatricula()!=null && this.getMatricula().equals(castOther.getMatricula()) )
	 && ( (this.getDatahoraAcesso()==castOther.getDatahoraAcesso()) || ( this.getDatahoraAcesso()!=null && castOther.getDatahoraAcesso()!=null && this.getDatahoraAcesso().equals(castOther.getDatahoraAcesso()) ) );
	}

   public int hashCode() {
         int result = 17;
         result = 37 * result + ( getMatricula() == null ? 0 : this.getMatricula().hashCode() );
         result = 37 * result + ( getDatahoraAcesso() == null ? 0 : this.getDatahoraAcesso().hashCode() );
         return result;
   }   

	/**
	 * @return Returns the datahoraAcesso.
	 */
	public Date getDatahoraAcesso() {
		return datahoraAcesso;
	}
	/**
	 * @param datahoraAcesso The datahoraAcesso to set.
	 */
	public void setDatahoraAcesso(Date datahoraAcesso) {
		this.datahoraAcesso = datahoraAcesso;
	}
	/**
	 * @return Returns the matricula.
	 */
	public String getMatricula() {
		return matricula;
	}
	/**
	 * @param matricula The matricula to set.
	 */
	public void setMatricula(String matricula) {
		this.matricula = matricula;
	}
	
	
}
